<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title></title>
	<link rel="stylesheet" type="text/css" href="../../css/bootstrap.min.css"/>
	<link rel="stylesheet" type="text/css" href="../../css/common.css"/>
	<script src="../../js/jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<div class="container">
	<div class="row clearfix">
		<div class="col-md-12 column">
			<div class="page-header">
				<h1>
					编辑文章 <small>Edit the articles</small>
				</h1>
			</div>
			<nav class="navbar navbar-default navbar-inverse" role="navigation">
				<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
					<ul class="nav navbar-nav">
						<li>
							 <a href="./index.php">首页</a>
						</li>
						<li>
							 <a href="./catlist.php">栏目列表</a>
						</li>
						<li>
							 <a href="./catadd.php">增加栏目</a>
						</li>
						<li>
							 <a href="./artlist.php">文章列表</a>
						</li>
						<li>
							 <a href="./artadd.php">增加文章</a>
						</li>
					</ul>
				</div>
			</nav>
		</div>
	</div>
	<div class="row clearfix">
		<div class="col-md-4 column">
			
			<div class="aside">
				<h4>栏目管理</h4>
				<ul>
					<li><a href="">栏目列表</a></li>
					<li><a href="">添加栏目</a></li>
				</ul>
			</div>
			
			<div class="aside">
				<h4>文章管理</h4>
				<ul>
					<li><a href="">文章列表</a></li>
					<li><a href="">发布文章</a></li>
				</ul>
			</div>
			<div class="aside">
				<h4>个人中心</h4>
				<ul>
					<li><a href="">修改密码</a></li>
					<li><a href="">退出登录</a></li>
				</ul>
			</div>
			
		</div>
		<div class="col-md-8 column">
			
			<form class="form-horizontal" role="form" action="#" method="post">
			  <div class="form-group">
			    <label for="title" class="col-sm-2 control-label">标题</label>
			    <div class="col-sm-10">
			      <input type="text" class="form-control" name="title" id="title" placeholder="" value="<?php echo $art['title'];?>">
			    </div>
			  </div>
			  <div class="form-group">
			    <label for="cat_id" class="col-sm-2 control-label">栏目</label>
			    <div class="col-sm-10">
					<select class="form-control" name="cat_id" id="cat_id">
						<?php foreach($cats as $c) {?>
						<option value="<?php echo $c['cat_id']?>"
						<?php if($c['cat_id'] == $art['cat_id']) {?>
							selected="selected";
						<?php }?>
						>
						
						
						<?php echo $c['catname']?></option>
						<?php }?>
					</select>
			    </div>
			  </div>
			  <div class="form-group">
			    <label for="tag" class="col-sm-2 control-label">标签</label>
			    <div class="col-sm-10">
			      <input type="text" class="form-control" name="tag" id="tag" placeholder="" value="<?php echo $art['arttag'];?>">
			    </div>
			  </div>
			  <div class="form-group">
			      <label for="content" class="col-sm-2 control-label">内容</label>
				  <div class="col-sm-10">
				    <textarea class="form-control" name="content" id="content" rows="10"><?php echo $art['content'];?></textarea>
				  </div>
			  </div>
			  
			  
			  
			  <div class="form-group">
			    <div class="col-sm-offset-2 col-sm-10">
			      <button type="submit" class="btn btn-primary">提交</button>
			    </div>
			  </div>
			</form>
			
			
			
		</div>
	</div>
</div>
	
</body>
</html>